Skip to content

Instantly share code, notes, and snippets.

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 21, 2024 02:55
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@lmarkus
lmarkus / README.MD
Last active May 21, 2024 02:50
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

@galpratama
galpratama / app.blade.php
Created March 17, 2021 15:54
Laravel Datatables Snippet
<!--- Tambahkan setelah app.css --->
<link href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" rel="stylesheet">
<link href="https://cdn.datatables.net/responsive/2.2.3/css/responsive.dataTables.min.css" rel="stylesheet">
<style>
/*Form fields*/
.dataTables_wrapper select,
.dataTables_wrapper .dataTables_filter input {
color: #4a5568; /*text-gray-700*/
padding-left: 1rem; /*pl-4*/
padding-right: 1rem; /*pl-4*/
@galpratama
galpratama / ResponseFormatter.php
Created February 19, 2020 11:18
API Response Formatter
<?php
namespace App\Http\Controllers\API;
class ResponseFormatter
{
protected static $response = [
'meta' => [
'code' => 200,
'status' => 'success',
@nvgoldin
nvgoldin / asyncio_shutdown_loop.py
Created July 27, 2016 13:34
Python 3.5 asyncio - shutdown all tasks safely using signal handler
import signal
import functools
async def looping_task(loop, task_num):
try:
while True:
print('{0}:in looping_task'.format(task_num))
await asyncio.sleep(5.0, loop=loop)
except asyncio.CancelledError:
return "{0}: I was cancelled!".format(task_num)
@michaeltlombardi
michaeltlombardi / profile_helpers.ps1
Last active May 21, 2024 02:45
Cross Platform theming and prompt built on FiraCode, Monokai, and Starship
#region Custom Function Definitions
Function Test-Administrator {
$CurrentUser = [Security.Principal.WindowsIdentity]::GetCurrent()
$AdministratorRole = [Security.Principal.WindowsBuiltInRole] "Administrator"
([Security.Principal.WindowsPrincipal]$CurrentUser).IsInRole($AdministratorRole)
}
#endregion
#region Prompt Prep
# Set ENV for elevated status
@huynguyencong
huynguyencong / #BuildiOSWithGitHubAction.md
Last active May 21, 2024 02:43
Script to build iOS and deploy it to TestFlight using GitHub action

When merging code to build/test-flight branch, it is built and uploaded to TestFlight automatically by GitHub Action.

Set up/update the following secrets:

  • CERTIFICATES_FILE_BASE64: Base64 of the App Store distribution certificate.
  • CERTIFICATES_PASSWORD: App Store distribution certificate password.
  • APPSTORE_ISSUER_ID: App Store Connect API key's issuer ID.
  • APPSTORE_KEY_ID: App Store Connect API key's key ID.
  • APPSTORE_PRIVATE_KEY: App Store Connect API key's private key (raw p8 file).
@Repox
Repox / send.php
Created April 12, 2018 06:04
Google API PHP Client - Firebase Cloud Messaging Service v1 example
<?php
/**
* This serves as an example of how to use the Google API PHP Client
* with Firebase Cloud Messaging Service.
*
* The client can be found here:
* https://github.com/google/google-api-php-client
*
* At the time of writing this, there's no Service object for the correct
@jtbandes
jtbandes / decode-dyn-uti.swift
Last active May 21, 2024 02:42
Dynamic UTI decoding
/// Decodes a dynamically-generated Uniform Type Identifier for inspection purposes. (**NOT FOR PRODUCTION USE!**)
/// Many, many thanks to http://alastairs-place.net/blog/2012/06/06/utis-are-better-than-you-think-and-heres-why/
///
/// <https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-BCGCDHIJ>
func decodeDynUTI(_ uti: String) -> String?
{
let vec = Array("abcdefghkmnpqrstuvwxyz0123456789")
let encoded = Array(uti).suffix(from: 5)
var result: [UInt8] = []
@chenjingxili1979
chenjingxili1979 / 官网地址(sesee10.app).txt
Last active May 21, 2024 02:38
黄瓜地址(https:/sesee10.app)浏览器无法下载的,建议使用谷歌浏览器
最新官网: sesee10.app ||| 请关注我们随时找到最新域名
如有使用上问题请至土豆交流群询问管理
土豆交流群: https://pzcp.org/hgav030
在线观看(http://cuke08.live/)
1. 如果域名被封请访问下个域名http://cuke09.live/
2. 无需安装,大陆网络直接观影(网页)